//package com.kws.payment.controller;
//
//import com.alipay.api.AlipayApiException;
//import com.kws.common.core.domain.R;
//import com.kws.payment.dao.AlipayRefundOrderRq;
//import com.kws.payment.dao.AlipayWebRq;
//import com.kws.payment.service.AlipayService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//
///**
// * <b>AlipayController</b>
// *
// * @description: AlipayController <br>
// * @date: 2024/10/31 09:55 <br>
// * @author: lhm <br>
// * @version: 1.0 <br>
// */
//
//@Api(tags = "支付宝支付模块")
//@RestController
//public class AlipayController {
//    private static final Logger logger = LoggerFactory.getLogger(AlipayController.class);
//
//    @Autowired
//    private AlipayService alipayService;
//
//    @ApiOperation("支付宝web端下单拉起支付")
//    @PostMapping("/create/alipayWeb/order")
//    public R alipayWebOrder(@RequestBody AlipayWebRq rq) throws AlipayApiException {
//        String payUrl = alipayService.alipayWebPay(rq);
//        return R.ok(payUrl);
//    }
//
//    @ApiOperation("取消支付订单")
//    @GetMapping("/cancel/alipay/order")
//    public R cancelAlipayOrder(@RequestParam String orderNo) throws AlipayApiException {
//        boolean status = alipayService.cancelAlipayOrder(orderNo);
//        return R.ok(status);
//    }
//
//    @ApiOperation("根据订单号进行退单退款")
//    @PostMapping("/refund/order")
//    public R refundOrder(@RequestBody AlipayRefundOrderRq rq) throws AlipayApiException {
//        String payUrl = alipayService.refundOrder(rq);
//        return R.ok(payUrl);
//    }
//
//
//
////    @ApiOperation("支付宝h5端下单支付")
////    @PostMapping("/create/alipayH5/order")
////    public R createAlipayH5Order(@RequestBody AlipayWebRq rq) throws AlipayApiException {
////        String message = alipayService.createAlipayH5Order(rq);
////        return R.ok(message);
////    }
//}
